package org.example.myleet.p703;

import org.example.myleet.Utils.Assert;

public class Main {
    public static void main(String[] args) {
        KthLargest example1 = new KthLargest(3, new int[]{4, 5, 8, 2});
        Assert.isTrue(4 == example1.add(3));
        Assert.isTrue(5 == example1.add(5));
        Assert.isTrue(5 == example1.add(10));
        Assert.isTrue(8 == example1.add(9));
        Assert.isTrue(8 == example1.add(4));
        KthLargest example2 = new KthLargest(1, new int[]{});
        Assert.isTrue(4 == example2.add(4));
        Assert.isTrue(5 == example2.add(5));
        Assert.isTrue(10 == example2.add(10));
        Assert.isTrue(10 == example2.add(9));
        Assert.isTrue(10 == example2.add(4));
    }
}
